The messaging app got some bad publicity last year, when it was reported that many alt-right; "incel," or male supremacist; and other hate groups were using it to meet, talk, and plan real-life gatherings, particularly ahead of the "Unite the Right" rally in Charlottesville, Virginia, last August. The app allows users to chat anonymously and privately, which helped attract the groups.
Discord's developers have since banned many of those hate groups. But identifying and ousting them can be like playing a game of whack-a-mole; even after they're banned, many come back in other places.
Still, in general, Discord is safe. No one can join a channel except by invitation, and users have to choose to join them. So no one can make you view or post content you're not interested in.
Discord also offers you the ability to block content that's unsuitable for work and to disconnect from servers at any time. You can easily mute or block individual users and prevent anyone you don't know from adding you as a friend.
Even so, such features won't necessarily prevent all harassment or bullying within particular text or voice channels.
For parents who are concerned about their teens using Discord to chat with friends, I recommend the same amount of caution you would have with social-media sites such as Twitter or Reddit. I suggest you read Discord's Community Guidelines and the Parent's Guide to Discord, written by one of the service's developers.